<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <title>Document</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/css/custom-themes.css">
    <link rel="stylesheet" href="/static/css/custom.css">
</head>
<body>
<div class="container-fluid">
    <div class="row p-3">
        <div class="col">
            <form class="needs-validation" novalidate>
                <div class="form-row">
                    <div class="col-sm-6 mb-3">
                        <label for="validationCustom01">First name</label>
                        <input type="text" class="form-control form-control-sm" id="validationCustom01" placeholder="First name" required>
                        <div class="valid-feedback">
                            Looks good!
                        </div><div class="invalid-feedback">
                        Looks good!ss
                    </div>
                    </div>
                    <div class="col-sm-6 mb-3">
                        <label for="validationCustom02">Last name</label>
                        <input type="text" class="form-control form-control-sm" id="validationCustom02" placeholder="Last name" value="Otto" required>
                        <div class="valid-feedback">
                            Looks good!
                        </div>
                    </div>
                    <div class="col-sm-4 mb-3">
                        <label for="validationCustomUsername">Username</label>
                        <div class="input-group input-group-sm">
                            <div class="input-group-prepend">
                                <span class="input-group-text" id="inputGroupPrepend">@</span>
                            </div>
                            <input type="text" class="form-control" id="validationCustomUsername" placeholder="Username" aria-describedby="inputGroupPrepend" required>
                            <div class="invalid-feedback">
                                Please choose a username.
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-4 mb-3">
                        <label for="validationCustomUsername">Email</label>
                        <div class="input-group input-group-sm">
                            <div class="input-group-prepend">
                                <span class="input-group-text" id="inputGroupPrepend">@</span>
                            </div>
                            <input type="email" class="form-control" id="validationCustomEmail" placeholder="Email" aria-describedby="inputGroupPrepend" required>
                            <div class="invalid-feedback">
                                Please choose a username.
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-4 mb-3">
                        <label for="validationCustomUsername">Phone</label>
                        <div class="input-group input-group-sm">
                            <div class="input-group-prepend">
                                <span class="input-group-text" id="inputGroupPrepend">@</span>
                            </div>
                            <input type="text" class="form-control" id="validationCustomPhone" placeholder="Phone" aria-describedby="inputGroupPrepend" required>
                            <div class="invalid-feedback">
                                Please choose a username.
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-row">
                    <div class="col-md-6 mb-3">
                        <label for="validationCustom03">Company</label>
                        <input type="text" class="form-control form-control-sm" id="validationCompany" placeholder="Company" required>
                        <div class="invalid-tooltip ">
                            Please provide a valid Company.
                        </div>
                    </div>
                    <div class="col-md-3 mb-3">
                        <label for="validationCustom04">Department</label>
                        <input type="text" class="form-control form-control-sm" id="validationDepartment" placeholder="Department" required>
                        <div class="invalid-tooltip ">
                            Please provide a valid Department.
                        </div>
                    </div>
                    <div class="col-md-3 mb-3">
                        <label for="validationCustom05">Job</label>
                        <input type="text" class="form-control form-control-sm" id="validationJob" placeholder="Job" required>
                        <div class="invalid-tooltip ">
                            Please provide a valid Job.
                        </div>
                    </div>
                </div>
                <div class="form-row">
                    <div class="form-check mb-3">
                        <input class="form-check-input" type="checkbox" value="" id="invalidCheck" required>
                        <label class="form-check-label" for="invalidCheck">
                            Agree to terms and conditions
                        </label>
                        <div class="invalid-feedback">
                            You must agree before submitting.
                        </div>
                    </div>
                </div>
                <div class="form-row">
                    <div class="col-sm-6 mb-3">
                        <label for="inputCity">City</label>
                        <input type="text" class="form-control form-control-sm" id="inputCity" required>
                        <div class="invalid-feedback">
                            You must agree before submitting.
                        </div>
                    </div>
                    <div class="col-sm-4 mb-3">
                        <label for="inputState">State</label>
                        <select id="inputState" class="form-control form-control-sm" required>
                            <option>Choose...</option>
                            <option>...</option>
                        </select>
                        <div class="invalid-feedback">
                            You must agree before submitting.
                        </div>
                    </div>
                    <div class="col-sm-2 mb-3">
                        <label for="inputZip">Zip</label>
                        <input type="text" class="form-control form-control-sm" id="inputZip" required>
                        <div class="invalid-feedback">
                            You must agree before submitting.
                        </div>
                    </div>
                </div>
                <div class="form-row">
                    <div class=" mb-3">
                        <label for="">radio</label>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios1" value="option1" checked>
                            <label class="form-check-label" for="exampleRadios1">
                                Default radio
                            </label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios2" value="option2">
                            <label class="form-check-label" for="exampleRadios2">
                                Second default radio
                            </label>
                        </div>
                        <div class="form-check form-check-inline disabled">
                            <input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios3" value="option3" disabled>
                            <label class="form-check-label" for="exampleRadios3">
                                Disabled radio
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-row">
                    <div class="col-sm-12 col mb-3">
                        <label for="exampleFormControlTextarea1">Example textarea</label>
                        <textarea class="form-control form-control-sm" id="exampleFormControlTextarea1" rows="3" required></textarea>
                        <div class="invalid-feedback">
                            You must agree before submitting.
                        </div>
                    </div>
                </div>
                <div class="form-row">
                    <div class="col mb-3">
                        <label for="exampleFormControlFile1">Example file input</label>
                        <input type="file" name="files" id="files" multiple class="file-loading" />
                        <div class="invalid-feedback">
                            You must agree before submitting.
                        </div>
                    </div>
                </div>
                <button class="btn btn-primary" type="submit">Submit form</button>
            </form>
        </div>
    </div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js" type="text/javascript"></script>
<script src="https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://cdn.bootcss.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="/static/plugins/layui/layui.all.js"></script>
<script src="/static/js/buttonLoading.js"></script>
<script src="/static/js/custom.js"></script>
<script>
    $(function () {
        'use strict';
        window.addEventListener('load', function () {
            var forms = document.getElementsByClassName('needs-validation');
            var validation = Array.prototype.filter.call(forms, function (form) {
                form.addEventListener('submit', function (event) {
                    if (form.checkValidity() === false) {
                        event.preventDefault();
                        event.stopPropagation();
                    } else {
                        /* 允许提交 */
                    }
                    form.classList.add('was-validated');
                }, false);
            });
        }, false);

        //0.初始化fileinput
        var oFileInput = new FileInput();
        oFileInput.Init("files", "/commons/upload");
    });
</script>
</body>
</html>